<?php $i=0; //contador para tablas cebra?>
<form action="<?php echo $tpl_dGrid->s_action?>" method="post">
<table class="tablesorter">
	<?if(isset($tpl_dGrid->s_caption)):?>
		<caption> <?php echo $tpl_dGrid->s_caption;?></caption>
	<?php endif?>
<thead>
	<tr>
	 	<?php foreach($tpl_dGrid->a_headers as $s_head):?>
			<th><?php echo $s_head;?></th>
		<?php endforeach?>
	</tr>
</thead>
<tbody>
	<?php foreach($tpl_dGrid->a_data as $o_val):?>
	<?php $i++;
		$s_class = $i % 2 == 0 ? 'class="odd"': '';
	?>
		<tr <?php echo $s_class?>>
			<?php 
			$a_tmp = get_object_vars($o_val);
			foreach($o_val as $s_key => $s_val):?>
				<?php if (in_array($s_key, $tpl_dGrid->a_ignore))continue;?>
				<td><?php echo $s_val?></td>
			<?php endforeach?>
			<?php $id = $tpl_dGrid->s_id;?>
			<?php foreach($tpl_dGrid->a_request as $s_request):?>
				<?php $a_req =explode(':',$s_request);?>
				<td><button type="submit" value="<?php echo $o_val->$id?>" name="<?php echo $a_req[1]?>"><img src="<?php echo HOST_ADMIN?>images/<?php echo $a_req[1]?>.png" alt="<?php echo $a_req[0]?>"/></button></td>
			<?php endforeach?>
		</tr>
	<?php endforeach?>
</tbody>
</table>
</form>
